import Taro, { useState } from "@tarojs/taro";
import { View, Canvas, Button } from "@tarojs/components";
import CSS from "./testTap.module.less";
// https://taro-ext.jd.com/plugin/view/5cf7d15bcfb7630043191543
import { Barcode, QRCode } from 'taro-code'

const Index = () => {
  const [canvasId, setCanvasId] = useState("canvaszxc");
  return (
    <View>
      <View className={CSS.main}>一个字组件</View>
      <Button onClick={handleGo}>生成二维码</Button>
      <Barcode text='hello' width={300} height={60} scale={4} />
        <QRCode
          text='1123'
          size={300}
          scale={4}
          errorCorrectLevel='M'
          typeNumber={2}
        />
    </View>
  );
  function handleGo() {

  }
};

export default Index;
